package com.loukou.lkt.lkt.enums;


public enum PoPurchaseorderStateEnum {

	//采购单状态，0未审核，1部门已审核，2财务已审核 3已收货，4已完成，5已取消采购，6供应商已通知仓库(仓库还没反馈收货结果) 7已对账 8已开票
	STATE_UNKNOWN( -1, "" ),
	
	STATE_UNCHECK( 0, "未审核" ),
	
	STATE_DEPART_CHECKED( 1, "部门已审核" ),
	
	STATE_FINANCE_CHECKED( 2, "财务已审核" ),
	
	STATE_RECEIVED( 3, "已收货" ),
	
	STATE_CLOSED( 4, "已完成" ),
	
	STATE_CANCELED( 5, "已取消采购" ),
	
	STATE_NOTIFIED( 6, "已通知仓库(仓库还没反馈收货结果)" ),
	
	STATE_ACCOUNT_CHECKED( 7, "已对账"),
	
	STATE_BILLED( 8, "已开票");
	
	private int state;
	private String comment;
	
	PoPurchaseorderStateEnum( int state, String comment) {
		this.state = state;
		this.comment = comment;
	}
	
	public static PoPurchaseorderStateEnum parseType(int state) {
		for (PoPurchaseorderStateEnum e : PoPurchaseorderStateEnum.values()) {
			if (e.state == state) {
				return e;
			}
		}
		return STATE_UNKNOWN;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}
	
	
}
